package com.neno.repository;

import com.neno.entity.Person;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.sql.Timestamp;
import java.util.List;

/**
 * @Author: root
 * @Date: 2018/11/10 0:07
 */
public interface PersonRepository extends JpaRepository<Person, Long> {
    /**
     * fetch data by createTime
     *
     * @param createTime
     * @return List<Person>
     */
    @Query("select p from Person p where p.createTime>=?1")
    List<Person> findPersonByCreateTime(Timestamp createTime);

}
